package org.fxcontainer.controls.ext
{
	import mx.controls.Label;
	import mx.events.FlexEvent;
	
	import org.fxcontainer.utils.ControlRegisterHelper;
	import org.fxcontainer.controls.IControl;
	
	/**
	 * The frameworks <code>Label</code> implementation. 
	 * @author Izzet_Mustafayev
	 */
	public class Label extends mx.controls.Label implements IControl
		{
			
			/**
			 * The control name. 
			 */
			private var _controlName:String;
			
			public function Label()
			{
				super();
				//subscribe to creation complete event to announce controll appearence
				this.addEventListener(FlexEvent.CREATION_COMPLETE, ControlRegisterHelper.register);
			}			
			
			public function controlName():String
			{
				return this._controlName;
			}
			
			public function set controlname(controlName:String):void
			{
				this._controlName = controlName;
			}
			
			public function setTextLabel(label:String):void
			{
				this.text = label;
			}
		}
}